package com.xyqlx.paddydoctor;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface FlaskServerService {
    @GET("classifier/test")
    Call<ResponseBody> getTest();

    @Multipart
    @POST("classifier/classify/{modelId}")
    Call<ResponseBody> classify(@Path(value = "modelId", encoded = true) String modelId, @Query("token") String token, @Part MultipartBody.Part filePart);

    @POST("user/login")
    Call<ResponseBody> login(@Body RequestBody body);

    @POST("classifier/feedback")
    Call<ResponseBody> feedback(@Query("token") String token, @Body RequestBody body);

    @GET("classifier/feedback")
    Call<ResponseBody> getFeedback(@Query("token") String token);

    @POST("user/history")
    Call<ResponseBody> history(@Query("token") String token);

    @POST("user/image/{fileId}")
    Call<ResponseBody> getImage(@Path(value = "fileId", encoded = true) String fileId, @Query("token") String token);

    @POST("user/profile")
    Call<ResponseBody> updateProfile(@Body RequestBody body, @Query("token") String token);

    @POST("user/trending")
    Call<ResponseBody> getTrending(@Query("token") String token);

    @POST("user/trending/{modelId}")
    Call<ResponseBody> getModelTrending(@Path(value = "modelId", encoded = true) String modelId, @Query("token") String token);

    @GET("classifier/knowledge")
    Call<ResponseBody> getKnowledge();

    class HttpConfig {

        public static final String BASE_URL = "http://139.217.228.30:13579/";

    }
}
